<template>
  <div class="footer1">
    <span>合计:{{ list.length }}</span>
    <!-- <button @click="del">清空任务</button> -->
    <!-- 简写形式,直接在注册事件上写表达式,注意不需要加this -->
    <button @click="$emit('clearlist')">清空任务</button>
  </div>
</template>
<script>
export default {
  name: '',
  props: {
    list: {
      type: Array,
      default: () => []//对于复杂数据类型,默认值要使用函数方式返回

    }
  },
  data () {
    return {

    }
  },
  created () {
  },
  computed: {
  },
  methods: {
    // del () {
    //   console.log(this.list);
    //   this.$emit('clearlist')
    // }
  }
}
</script>
<style lang='less'  scoped>
.footer1 {
  margin-top: 20px;
  display: flex;
  justify-content: space-around;
  text-align: center;
}
</style>
